package com.it.service.impl;

import com.it.Bean.sys_user;
import com.it.dao.Sys_userDao;
import com.it.dao.impl.Sys_userDaoimpl;
import com.it.service.Sys_userService;

import java.util.List;

public class Sys_userServiceimpl implements Sys_userService {
    public Sys_userDao dao=new Sys_userDaoimpl();
    @Override
    public sys_user QueryById(Integer id) {
        sys_user suser = dao.queryById(id);
        return suser;
    }

    @Override
    public List<sys_user> QueryAll() {
        List<sys_user> queryAll = dao.getQueryAll();
        if (queryAll.size()!=0){
            return queryAll;
        }
        return null;
    }

    @Override
    public boolean Adduser(sys_user user) {

        return dao.save(user);
    }

    @Override
    public boolean Updateuser(sys_user user) {
        return dao.update(user);
    }

    @Override
    public boolean Deleteuser(Integer id) {
        return dao.delete(id);
    }
}
